﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using DataAccess.Classes;

namespace Webmau.Admin.Control
{
    public partial class DiaDiem_Them : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnThem_Click(object sender, EventArgs e)
        {
            DiaDiem1 data = new DiaDiem1();
            data.TenDiaDiem = txtTenDiaDiem.Text;
            data.ThongTin = txtThongTin.Text;
            if (cbHienThi.Checked == true)
            {
                data.TinhTrang = Convert.ToBoolean("True".ToString());
            }
            if (cbHienThi.Checked == false)
            {
                data.TinhTrang = Convert.ToBoolean("False".ToString());
            }
            DiaDiem1.Them(data);
            lbThongBao.Text = "Thêm thành công!";
        }
    }
}
